<%@ page import="Entity.Employer" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
    <style type="text/css">
        #div1 {
            margin-left: 36px;
            margin-top: 20px;
        }

        .label {
            display: inline;
            padding: .2em .6em .3em;
            font-size: 92%;
            font-weight: 700;
            line-height: 1;
            color: #fff;
            text-align: center;
            white-space: nowrap;
            vertical-align: baseline;
            border-radius: .25em;
        }

        th {
            text-align: center;
            padding: 5px;
            font-size: 16px;
            border: 1px solid #ddd
        }

        td {
            text-align: center;
            padding: 5px;
            font-size: 16px;
            border: 1px solid #ddd
        }

        img {
            width: 60px;
            height: 50px;
        }

        tr {
            display: table-row;
            vertical-align: inherit;
            border-color: inherit;
            border-top-color: inherit;
            border-right-color: inherit;
            border-bottom-color: inherit;
            border-left-color: inherit;
        }

        table {
            border-spacing: 0;
            border-collapse: collapse;
            width: 1400px;
        }
    </style>
    <script type="text/javascript" src="static/js/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#commitBtn").click(function () {
                if (confirm("确定更新招聘信息吗？")) {
                    var phone = $("#phone").val().trim();
                    if (phone === "") {
                        alert("手机号码不能为空")
                        return false
                    } else {
                        var regExp = /^[1-9][0-9]{10}$/
                        if (!regExp.test(phone)) {
                            alert("手机号码格式不正确")
                            return false
                        }
                    }
                }
            })
        })
    </script>
</head>
<body>

<%
    Employer myinfm = (Employer) request.getAttribute("myinfm");
%>
<div style="margin: 60px">
    <h1 style="background-color: #5bc0de; font-size: 20px" class="label">招聘信息管理</h1>
    <br><br>
    <div align="center" style="margin-top: 30px">
        <form id="commitForm" action="Emupdate">
            <table style="line-height: 30px; width: 400px;
            border: 1px solid #faebcc">
                <tr style="color: #8a6d3b;
                           background-color: #fcf8e3;
                           border: 1px solid #faebcc;"
                    align="center">
                    <td colspan="2">招聘信息</td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>公司ID</td>
                    <td>
                        <input type="text" id="userID" name="userID" value="<%=myinfm.getEid()%>">
                    </td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>公司</td>
                    <td><input type="text" id="ename" name="ename" value="<%=myinfm.getEname()%>"></td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>联系人</td>
                    <td><input type="text" id="conter" name="conter" value="<%=myinfm.getContacter()%>"/></td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>电话</td>
                    <td><input type="text" id="phone" name="phone" value="<%=myinfm.getPhone()%>"></td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>学历要求</td>
                    <td><input type="text" id="education" name="education" value="<%=myinfm.getEducation()%>"></td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>招聘人数</td>
                    <td><input type="text" id="renum" name="renum" value="<%=myinfm.getReNum()%>"></td>
                </tr>
                <tr align="center" style="line-height: 32px">
                    <td>招聘职位</td>
                    <td><input type="text" id="position" name="position" value="<%=myinfm.getPosition()%>"></td>
                </tr>
                <tr style="line-height: 60px">
                    <td colspan="2" align="center">
                        <input type="submit" id="commitBtn" style="
                          color: #fff; width: 200px; margin: 10px;
                          background-color: #5cb85c;
                          border-color: #4cae4c;
                          font-size: 18px;
                          font-weight: 400;
                          display: inline-block;
                          padding: 6px 12px;cursor: pointer;" value="更新信息">
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>


</html>
